#pragma comment(linker, "/STACK:10000000")
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <set>
#include <map>
#include <cstdio>
#include <cassert>
#include <string>
#include <cstring>
#define ldb double
#define LL long long
#define fi first
#define se second
#define fill(a, c) memset(a, c, sizeof(a))
#define sqr(a) ((a) * (a))
#define nextLine() {int c = 0; while((c = getchar()) != 10 && c != EOF);}
#define getBit(mask, k) (((mask) / pw[k]) % pw[1])
#define setBit(mask, k, l) (((mask) / pw[k + 1] * pw[1] + (l)) * pw[k] + ((mask) % pw[k]))
#define debug(a) cerr << #a << " = " << a << " ";
#define debugl(a) cerr << #a << " = " << a << "\n";
const ldb LDINF = 9128739847123.00;
const ldb eps = 1e-9;
const int INF = 1 << 30;
const ldb pi = fabsl(atan2(0.0, -1.0));
using namespace std;

int maxx, maxy;
LL w;
ldb vals[100010];
ldb ivals[100010];


inline int rev(int i)
{
	int c = 0;
	while (i > 0)
	{
		c = c * 10 + (i % 10);
		i /= 10;
	}
	return c;
}


void Load()
{
	cin >> maxx >> maxy >> w;
	int i;
	for (i = 1; i <= max(maxx, maxy); i++)
	{
		vals[i] = (ldb)i / (ldb)rev(i);
		ivals[i] = 1.0 / vals[i]; 
	}
}
int ry, rx;
LL rr;
pair <ldb, int> all[200010];

bool check(int rx, int ry, int c = 0)
{
	if (c)
	{
		if ((LL)rx * (LL)ry >= rr) return true;
	}
	int i;
	int sz = 0;
	for (i = 1; i <= rx; i++)
	{
		all[sz++] = make_pair(vals[i], 0);
	}
	for (i = 1; i <= ry; i++)
	{
		all[sz++] = make_pair(ivals[i], 1);
	}
	sort(all, all + sz);
	int cnt[2] = {0};
	LL res = 0;
	for (i = 0; i < sz; i++)
	{
		if (i > 0 && fabsl(all[i].first - all[i - 1].first) > eps)
		{
			res += (LL)cnt[0] * (LL)cnt[1];	
			cnt[0] = 0;
			cnt[1] = 0;
		}
		cnt[all[i].second]++;
	}
	res += (LL)cnt[0] * (LL)cnt[1];
	return res >= w;
}    

bool solve(int rx, int c = 0)
{
	int l = 1;
	int r = maxy;
	int mid;
	ry = -1;
	while (l <= r)
	{
		mid = (l + r) / 2;
		if (check(rx, mid, c))
		{
			ry = mid;
			r = mid - 1;
		}
		else l = mid + 1;
	}
	return ry != -1;
}

void Solve()
{
	int l = 1;
	int r = maxx;
	int mid;
	rx = -1;
	while (l <= r)
	{
		mid = (l + r) / 2;
		if (solve(mid))
		{
			rx = mid;
			r = mid - 1;
		}
		else l = mid + 1;
	}
	if (rx == -1)
	{
		cout << "-1";
		return;
	}
	solve(rx);
	rr = (LL)rx * (LL)ry;
	cerr << rx << " " << ry << " " << rr << "\n";
	for (int i = rx, k = 0; i <= maxx && k <= 15; i++, k++)
	{
		if (solve(i, 1) && (LL)i * (LL)ry < rr)
		{
			rx = i;
			rr = (LL)i * (LL)ry;
		}
	}
	solve(rx);
	cout << rx << " " << ry;
}

#define file "c"
int main()
{
	#ifndef ONLINE_JUDGE
	freopen(file".in", "rt", stdin);
	freopen(file".out", "wt", stdout);
	#endif
	Load();
	Solve();
	return 0;
}
